<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>电子钟</title>
    <script type="text/javascript">
        var timer;
        function start(){
            timer=setInterval(function (){
                var time;
                time=new Date();
                var currentTime;
                currentTime=time.toLocaleTimeString('chinese',{hour12:false});
                document.getElementById("show_block").value=currentTime;},1000);
        }
            function stop(){
            clearInterval(timer);
        }
    </script>

</head>
<body>
<div>
<input id="show_block" value="">
<input type="radio" onclick="start()" name="sl">启动时钟
<input type="radio" onclick="stop()" name="sl">停止时钟
</div>
</body>
</html>